/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.bs.beans.fiscal;

import java.beans.PropertyChangeListener;
import java.beans.PropertyChangeSupport;
import java.io.Serializable;
import java.math.BigDecimal;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Transient;

/**
 *
 * @author Bone
 */
@Entity
@Table(name = "PRODUTO_NF_ICMS")
public class ProdutoNfIcms implements Serializable {
    @Transient
    private PropertyChangeSupport changeSupport = new PropertyChangeSupport(this);
    private static final long serialVersionUID = 1L;
    @Id
    @Basic(optional = false)
    @Column(name = "ID")
    private Integer id;
    @Basic(optional = false)
    @Column(name = "ORIGEM")
    private short origem;
    @Basic(optional = false)
    @Column(name = "CST")
    private short cst;
    @Column(name = "MODALIDADE_BASE_CALCULO")
    private Short modalidadeBaseCalculo;
    // @Max(value=?)  @Min(value=?)//if you know range of your decimal fields consider using these annotations to enforce field validation
    @Column(name = "VALOR_BASE_CALCULO")
    private BigDecimal valorBaseCalculo;
    @Column(name = "V_BASE_ICMS_ST_RETIDO")
    private BigDecimal vBaseIcmsStRetido;
    @Column(name = "ALIQUOTA")
    private BigDecimal aliquota;
    @Column(name = "VALOR_ICMS")
    private BigDecimal valorIcms;
    @Column(name = "MODALIDADE_BASE_SUBSTITUTA")
    private Short modalidadeBaseSubstituta;
    @Column(name = "MODALIDADE_DESONERACAO_ICMS")
    private Short modalidadeDesoneracaoIcms;
    @Column(name = "P_BASE_OPERACAO_PROPRIA")
    private Short pBaseOperacaoPropria;
    @Column(name = "P_ADICIONADO_ICMS_ST")
    private BigDecimal pAdicionadoIcmsSt;
    @Column(name = "P_REDUCAO_ICMS_ST")
    private BigDecimal pReducaoIcmsSt;
    @Column(name = "P_REDUCAO_BASE_ICMS")
    private BigDecimal pReducaoBaseIcms;
    @Column(name = "VALOR_BASE_ICMS_ST")
    private BigDecimal valorBaseIcmsSt;
    @Column(name = "ALIQUOTA_ICMS_ST")
    private BigDecimal aliquotaIcmsSt;
    @Column(name = "VALOR_ICMS_ST")
    private BigDecimal valorIcmsSt;
    @Column(name = "VALOR_ICMS_RETIDO")
    private BigDecimal valorIcmsRetido;
    @Column(name = "UF_DEVIDO_ICMS_ST")
    private Integer ufDevidoIcmsSt;
    @Column(name = "V_BASE_ST_RETIDO_REMETENTE")
    private BigDecimal vBaseStRetidoRemetente;
    @Column(name = "V_ICMS_ST_RETIDO_REMETENTE")
    private BigDecimal vIcmsStRetidoRemetente;
    @Column(name = "V_BASE_ST_RETIDO_DESTINO")
    private BigDecimal vBaseStRetidoDestino;
    @Column(name = "V_ICMS_ST_RETIDO_DESTINO")
    private BigDecimal vIcmsStRetidoDestino;
    @Column(name = "COD_SIT_OPERACAO_SIMPLES")
    private Short codSitOperacaoSimples;
    @Column(name = "V_CREDITO_APROVEITADO_SIMPLES")
    private BigDecimal vCreditoAproveitadoSimples;
    @Column(name = "A_APLICAVEL_CREDITO_SIMPLES")
    private BigDecimal aAplicavelCreditoSimples;

    public ProdutoNfIcms() {
    }

    public ProdutoNfIcms(Integer id) {
        this.id = id;
    }

    public ProdutoNfIcms(Integer id, short origem, short cst) {
        this.id = id;
        this.origem = origem;
        this.cst = cst;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        Integer oldId = this.id;
        this.id = id;
        changeSupport.firePropertyChange("id", oldId, id);
    }

    public short getOrigem() {
        return origem;
    }

    public void setOrigem(short origem) {
        short oldOrigem = this.origem;
        this.origem = origem;
        changeSupport.firePropertyChange("origem", oldOrigem, origem);
    }

    public short getCst() {
        return cst;
    }

    public void setCst(short cst) {
        short oldCst = this.cst;
        this.cst = cst;
        changeSupport.firePropertyChange("cst", oldCst, cst);
    }

    public Short getModalidadeBaseCalculo() {
        return modalidadeBaseCalculo;
    }

    public void setModalidadeBaseCalculo(Short modalidadeBaseCalculo) {
        Short oldModalidadeBaseCalculo = this.modalidadeBaseCalculo;
        this.modalidadeBaseCalculo = modalidadeBaseCalculo;
        changeSupport.firePropertyChange("modalidadeBaseCalculo", oldModalidadeBaseCalculo, modalidadeBaseCalculo);
    }

    public BigDecimal getValorBaseCalculo() {
        return valorBaseCalculo;
    }

    public void setValorBaseCalculo(BigDecimal valorBaseCalculo) {
        BigDecimal oldValorBaseCalculo = this.valorBaseCalculo;
        this.valorBaseCalculo = valorBaseCalculo;
        changeSupport.firePropertyChange("valorBaseCalculo", oldValorBaseCalculo, valorBaseCalculo);
    }

    public BigDecimal getVBaseIcmsStRetido() {
        return vBaseIcmsStRetido;
    }

    public void setVBaseIcmsStRetido(BigDecimal vBaseIcmsStRetido) {
        BigDecimal oldVBaseIcmsStRetido = this.vBaseIcmsStRetido;
        this.vBaseIcmsStRetido = vBaseIcmsStRetido;
        changeSupport.firePropertyChange("VBaseIcmsStRetido", oldVBaseIcmsStRetido, vBaseIcmsStRetido);
    }

    public BigDecimal getAliquota() {
        return aliquota;
    }

    public void setAliquota(BigDecimal aliquota) {
        BigDecimal oldAliquota = this.aliquota;
        this.aliquota = aliquota;
        changeSupport.firePropertyChange("aliquota", oldAliquota, aliquota);
    }

    public BigDecimal getValorIcms() {
        return valorIcms;
    }

    public void setValorIcms(BigDecimal valorIcms) {
        BigDecimal oldValorIcms = this.valorIcms;
        this.valorIcms = valorIcms;
        changeSupport.firePropertyChange("valorIcms", oldValorIcms, valorIcms);
    }

    public Short getModalidadeBaseSubstituta() {
        return modalidadeBaseSubstituta;
    }

    public void setModalidadeBaseSubstituta(Short modalidadeBaseSubstituta) {
        Short oldModalidadeBaseSubstituta = this.modalidadeBaseSubstituta;
        this.modalidadeBaseSubstituta = modalidadeBaseSubstituta;
        changeSupport.firePropertyChange("modalidadeBaseSubstituta", oldModalidadeBaseSubstituta, modalidadeBaseSubstituta);
    }

    public Short getModalidadeDesoneracaoIcms() {
        return modalidadeDesoneracaoIcms;
    }

    public void setModalidadeDesoneracaoIcms(Short modalidadeDesoneracaoIcms) {
        Short oldModalidadeDesoneracaoIcms = this.modalidadeDesoneracaoIcms;
        this.modalidadeDesoneracaoIcms = modalidadeDesoneracaoIcms;
        changeSupport.firePropertyChange("modalidadeDesoneracaoIcms", oldModalidadeDesoneracaoIcms, modalidadeDesoneracaoIcms);
    }

    public Short getPBaseOperacaoPropria() {
        return pBaseOperacaoPropria;
    }

    public void setPBaseOperacaoPropria(Short pBaseOperacaoPropria) {
        Short oldPBaseOperacaoPropria = this.pBaseOperacaoPropria;
        this.pBaseOperacaoPropria = pBaseOperacaoPropria;
        changeSupport.firePropertyChange("PBaseOperacaoPropria", oldPBaseOperacaoPropria, pBaseOperacaoPropria);
    }

    public BigDecimal getPAdicionadoIcmsSt() {
        return pAdicionadoIcmsSt;
    }

    public void setPAdicionadoIcmsSt(BigDecimal pAdicionadoIcmsSt) {
        BigDecimal oldPAdicionadoIcmsSt = this.pAdicionadoIcmsSt;
        this.pAdicionadoIcmsSt = pAdicionadoIcmsSt;
        changeSupport.firePropertyChange("PAdicionadoIcmsSt", oldPAdicionadoIcmsSt, pAdicionadoIcmsSt);
    }

    public BigDecimal getPReducaoIcmsSt() {
        return pReducaoIcmsSt;
    }

    public void setPReducaoIcmsSt(BigDecimal pReducaoIcmsSt) {
        BigDecimal oldPReducaoIcmsSt = this.pReducaoIcmsSt;
        this.pReducaoIcmsSt = pReducaoIcmsSt;
        changeSupport.firePropertyChange("PReducaoIcmsSt", oldPReducaoIcmsSt, pReducaoIcmsSt);
    }

    public BigDecimal getPReducaoBaseIcms() {
        return pReducaoBaseIcms;
    }

    public void setPReducaoBaseIcms(BigDecimal pReducaoBaseIcms) {
        BigDecimal oldPReducaoBaseIcms = this.pReducaoBaseIcms;
        this.pReducaoBaseIcms = pReducaoBaseIcms;
        changeSupport.firePropertyChange("PReducaoBaseIcms", oldPReducaoBaseIcms, pReducaoBaseIcms);
    }

    public BigDecimal getValorBaseIcmsSt() {
        return valorBaseIcmsSt;
    }

    public void setValorBaseIcmsSt(BigDecimal valorBaseIcmsSt) {
        BigDecimal oldValorBaseIcmsSt = this.valorBaseIcmsSt;
        this.valorBaseIcmsSt = valorBaseIcmsSt;
        changeSupport.firePropertyChange("valorBaseIcmsSt", oldValorBaseIcmsSt, valorBaseIcmsSt);
    }

    public BigDecimal getAliquotaIcmsSt() {
        return aliquotaIcmsSt;
    }

    public void setAliquotaIcmsSt(BigDecimal aliquotaIcmsSt) {
        BigDecimal oldAliquotaIcmsSt = this.aliquotaIcmsSt;
        this.aliquotaIcmsSt = aliquotaIcmsSt;
        changeSupport.firePropertyChange("aliquotaIcmsSt", oldAliquotaIcmsSt, aliquotaIcmsSt);
    }

    public BigDecimal getValorIcmsSt() {
        return valorIcmsSt;
    }

    public void setValorIcmsSt(BigDecimal valorIcmsSt) {
        BigDecimal oldValorIcmsSt = this.valorIcmsSt;
        this.valorIcmsSt = valorIcmsSt;
        changeSupport.firePropertyChange("valorIcmsSt", oldValorIcmsSt, valorIcmsSt);
    }

    public BigDecimal getValorIcmsRetido() {
        return valorIcmsRetido;
    }

    public void setValorIcmsRetido(BigDecimal valorIcmsRetido) {
        BigDecimal oldValorIcmsRetido = this.valorIcmsRetido;
        this.valorIcmsRetido = valorIcmsRetido;
        changeSupport.firePropertyChange("valorIcmsRetido", oldValorIcmsRetido, valorIcmsRetido);
    }

    public Integer getUfDevidoIcmsSt() {
        return ufDevidoIcmsSt;
    }

    public void setUfDevidoIcmsSt(Integer ufDevidoIcmsSt) {
        Integer oldUfDevidoIcmsSt = this.ufDevidoIcmsSt;
        this.ufDevidoIcmsSt = ufDevidoIcmsSt;
        changeSupport.firePropertyChange("ufDevidoIcmsSt", oldUfDevidoIcmsSt, ufDevidoIcmsSt);
    }

    public BigDecimal getVBaseStRetidoRemetente() {
        return vBaseStRetidoRemetente;
    }

    public void setVBaseStRetidoRemetente(BigDecimal vBaseStRetidoRemetente) {
        BigDecimal oldVBaseStRetidoRemetente = this.vBaseStRetidoRemetente;
        this.vBaseStRetidoRemetente = vBaseStRetidoRemetente;
        changeSupport.firePropertyChange("VBaseStRetidoRemetente", oldVBaseStRetidoRemetente, vBaseStRetidoRemetente);
    }

    public BigDecimal getVIcmsStRetidoRemetente() {
        return vIcmsStRetidoRemetente;
    }

    public void setVIcmsStRetidoRemetente(BigDecimal vIcmsStRetidoRemetente) {
        BigDecimal oldVIcmsStRetidoRemetente = this.vIcmsStRetidoRemetente;
        this.vIcmsStRetidoRemetente = vIcmsStRetidoRemetente;
        changeSupport.firePropertyChange("VIcmsStRetidoRemetente", oldVIcmsStRetidoRemetente, vIcmsStRetidoRemetente);
    }

    public BigDecimal getVBaseStRetidoDestino() {
        return vBaseStRetidoDestino;
    }

    public void setVBaseStRetidoDestino(BigDecimal vBaseStRetidoDestino) {
        BigDecimal oldVBaseStRetidoDestino = this.vBaseStRetidoDestino;
        this.vBaseStRetidoDestino = vBaseStRetidoDestino;
        changeSupport.firePropertyChange("VBaseStRetidoDestino", oldVBaseStRetidoDestino, vBaseStRetidoDestino);
    }

    public BigDecimal getVIcmsStRetidoDestino() {
        return vIcmsStRetidoDestino;
    }

    public void setVIcmsStRetidoDestino(BigDecimal vIcmsStRetidoDestino) {
        BigDecimal oldVIcmsStRetidoDestino = this.vIcmsStRetidoDestino;
        this.vIcmsStRetidoDestino = vIcmsStRetidoDestino;
        changeSupport.firePropertyChange("VIcmsStRetidoDestino", oldVIcmsStRetidoDestino, vIcmsStRetidoDestino);
    }

    public Short getCodSitOperacaoSimples() {
        return codSitOperacaoSimples;
    }

    public void setCodSitOperacaoSimples(Short codSitOperacaoSimples) {
        Short oldCodSitOperacaoSimples = this.codSitOperacaoSimples;
        this.codSitOperacaoSimples = codSitOperacaoSimples;
        changeSupport.firePropertyChange("codSitOperacaoSimples", oldCodSitOperacaoSimples, codSitOperacaoSimples);
    }

    public BigDecimal getVCreditoAproveitadoSimples() {
        return vCreditoAproveitadoSimples;
    }

    public void setVCreditoAproveitadoSimples(BigDecimal vCreditoAproveitadoSimples) {
        BigDecimal oldVCreditoAproveitadoSimples = this.vCreditoAproveitadoSimples;
        this.vCreditoAproveitadoSimples = vCreditoAproveitadoSimples;
        changeSupport.firePropertyChange("VCreditoAproveitadoSimples", oldVCreditoAproveitadoSimples, vCreditoAproveitadoSimples);
    }

    public BigDecimal getAAplicavelCreditoSimples() {
        return aAplicavelCreditoSimples;
    }

    public void setAAplicavelCreditoSimples(BigDecimal aAplicavelCreditoSimples) {
        BigDecimal oldAAplicavelCreditoSimples = this.aAplicavelCreditoSimples;
        this.aAplicavelCreditoSimples = aAplicavelCreditoSimples;
        changeSupport.firePropertyChange("AAplicavelCreditoSimples", oldAAplicavelCreditoSimples, aAplicavelCreditoSimples);
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (id != null ? id.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof ProdutoNfIcms)) {
            return false;
        }
        ProdutoNfIcms other = (ProdutoNfIcms) object;
        if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "Apagar.ProdutoNfIcms[ id=" + id + " ]";
    }

    public void addPropertyChangeListener(PropertyChangeListener listener) {
        changeSupport.addPropertyChangeListener(listener);
    }

    public void removePropertyChangeListener(PropertyChangeListener listener) {
        changeSupport.removePropertyChangeListener(listener);
    }
    
}
